Jump to content

Module:Languages/code to canonical name

Frae Wikipedia, the free beuk o knawledge
local export = {}

local function iterate(list)
	for code, data in pairs(list) do
		export[code] = data.canonicalName
	end
end

iterate(mw.loadData("Module:languages/data2"))

for letter in mw.ustring.gmatch("abcdefghijklmnopqrstuvwxyz", "(.)") do
	iterate(mw.loadData("Module:languages/data3/" .. letter))
end

iterate(mw.loadData("Module:languages/datax"))

return export